<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    
</head>
<body>
    <span id="show"></span>
</body>
</html> 
<script src="../js/jstool.js"></script>
<script>

    var date =new Date();
    //显示时间
    show.innerHTML =date(date)
    //定时器
    setInterval(function(){
        var date =new Date();
        show.innerHTML =dates(date)
    },1000)
</script>